package com.lucky.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.lucky.system.dao.SlideAdDao;
import com.lucky.system.domain.SlideAdDO;
import com.lucky.system.service.SlideAdService;



@Service
public class SlideAdServiceImpl implements SlideAdService {
	@Autowired
	private SlideAdDao slideAdDao;
	
	@Override
	public SlideAdDO get(Long id){
		return slideAdDao.get(id);
	}
	
	@Override
	public List<SlideAdDO> list(Map<String, Object> map){
		return slideAdDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return slideAdDao.count(map);
	}
	
	@Override
	public int save(SlideAdDO slideAd){
		slideAd.setCreated(new Date());
		slideAd.setUpdated(new Date());
		return slideAdDao.save(slideAd);
	}
	
	@Override
	public int update(SlideAdDO slideAd){
		slideAd.setUpdated(new Date());
		return slideAdDao.update(slideAd);
	}
	
	@Override
	public int remove(Long id){
		return slideAdDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return slideAdDao.batchRemove(ids);
	}
	
}
